<div style="padding:30px" class="layui-form layui-form-pane">
    <div class="layui-form-item">
        <input type="hidden" id="id" value="{$data.id}">
        <label class="layui-form-label">字体分类：</label>
        <div class="layui-input-block">
            <select name="cate_id" id="cate_id" lay-verify="required" lay-search="">
                {foreach $parent as $key=>$vo}
                {foreach $vo['child'] as $k=>$v}
                <option value="{$v.id}" {eq name="$data['cate_id']" value="$v.id"}selected{/eq}>{$v.name}</option>
                {/foreach}
                {/foreach}
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">字体名称：</label>
        <div class="layui-input-block">
            <input type="text" name="name" id="name" value="{$data['name']}" required lay-verify="required" placeholder="请输入分类名称" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">样式预览：</label>
        <div class="layui-input-block">
            {Jshop:image id='image_id' name="image_id" value="$data['image_id']"/}
            <div class="layui-form-mid layui-word-aux list-tag">
                图标尺寸建议：60px*60px
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">AccessKey：</label>
        <div class="layui-input-block">
            <textarea name="access_key" id="AccessKey" placeholder="请输入AccessKey" class="layui-textarea">{$data['access_key']}</textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">上架/下架</label>
        <div class="layui-input-block">
            <input type="radio" name="marketable" value="1" title="上架" checked>
            <input type="radio" name="marketable" value="2" title="下架" >
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">排序：</label>
        <div class="layui-input-block">
            <input type="number" name="sort" id="sort" required lay-verify="required" placeholder="排序" autocomplete="off" class="layui-input" value="{$data['sort']}">
        </div>
    </div>
    <button class="layui-btn layui-btn-fluid edit-save-btn">保存</button>
</div>

<script>
    //渲染表单
    layui.use('form', function(){
        var form = layui.form;
        form.render();
    });
</script>